import request from '@/utils/request.js'

export function getAllSecKill() {
    
	return request({
		url: '/seckill-service/seckill/getAllSecKill',
		method: 'GET',
	})
}

export function queryDetailBySeckillId(seckillId) {
    const data={
		seckillId:seckillId
	}
	return request({
		url: '/seckill-service/seckill/queryDetailBySeckillId',
		method: 'GET',
		data:data
	})
}

export function queryCourseById(courseId) {
    const data={
		courseId:courseId
	}
	return request({
		url: '/seckill-service/seckill/queryCourseById',
		method: 'GET',
		data:data
	})
}

export function queryStuAuthen(studentId) {
    const data={
		studentId:studentId
	}
	return request({
		url: '/seckill-service/seckill/queryStuAuthen',
		method: 'GET',
		data:data
	})
}

export function querySeckillNum(seckillId) {
    const data={
		seckillId:seckillId
	}
	return request({
		url: '/seckill-service/seckill/querySeckillNum',
		method: 'GET',
		data:data
	})
}

export function secKillCourse(data) {

	return request({
		url: '/seckill-service/seckill/secKillCourse',
		method: 'POST',
		data:data
	})
}

// 查询秒杀结果
export function querySeckillResult(queryId) {
	const data={
		queryId:queryId
	}
  return request({
    url: '/seckill-service/seckill/querySecKillResult',
    method: 'GET',
    data: data
  })
}

// 查询用户限购情况
export function queryUserLimit(data) {
  return request({
    url: '/seckill-service/seckill/studentLimit',
    method: 'GET',
    data: data
  })
}